

<template>
  <div>
    Page B. <br>
    <router-link to="/a/page">返回PageA</router-link>
  </div>
</template>
<script setup>
import {useRoute,useRouter} from 'vue-router'
import {onMounted} from "vue";

const  route  = useRoute()
const   router  = useRouter()

onMounted(() => {

  console.log( 'route.name',route.name)
  console.log('route.path',route.path)
  console.log('route.query',route.query)
  console.log('route.params',route.params)
  console.log('route.fullPath',route.fullPath)
  console.log('route.hash',route.hash)
  console.log('route.meta',route.meta)
  console.log('route.redirectedFrom',route.redirectedFrom)
  console.log('route',route)
  console.log('router',router)
  console.log('router.options.history',router.options.history)

})
</script>

<style scoped>
div {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  margin-top: 60px;
  background-color: #fafafa;
  font-size: 20px;
}
</style>